package homework.api03.exercises02;

import java.util.ArrayList;
import java.util.List;

public class ListDemo1 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("one");
        list.add("two");
        list.add("three");
        list.add("four");
        list.add("five");
        System.out.println("list:"+list);

        String e = list.get(2);
        System.out.println(e);//three

        list.set(2,"six");
//        String old = list.set(3,"six");
//        System.out.println(old);//four
        System.out.println("list:"+list);











    }
}
